<template>
	<view class="content">
		<web-view class="webView" :src="src"></web-view>
	</view>
</template>
<script>
	import {
		mapGetters,
		mapMutations,
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {
				type: 0,
				src: ""
			}
		},
		onLoad(option) {
			this.type = parseInt(option.type)
		},
		onShow() {
			this.$nextTick(() => {
				// "http://112.74.107.124:1231/agreement/test/test/privacy.html"
				// "http://112.74.107.124:1231/agreement/test/test/user.html"
				// "http://112.74.107.124:1231/agreement/test/test/vip.html"
				let {
					privacy,
					user,
					vip
				} = this.appInfo.info.agreement
				console.log(
					privacy,
					user,
					vip
				)
				switch (this.type) {
					case 2:
						this.src = privacy
						break;
					case 1:
						this.src = user
						break;
					case 3:
						this.src = vip
						break;
				}
			})
		},
		computed: {
			...mapGetters(["appInfo"])
		},

		methods: {}



	}
</script>